<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>WorkPort</title>
    <link rel="stylesheet" type="text/css" href="../lib/kendo/styles/kendo.common-bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../lib/kendo/styles/kendo.bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../css/style.css">
    <link rel="stylesheet" type="text/css" href="../css/layout.css">
    <script src="../lib/kendo/js/jquery.min.js"></script>
    <script src="../lib/kendo/js/kendo.all.min.js"></script>
    <script src="../lib/kendo/js/jquery.transit.min.js"></script>
    <script src="../lib/jquery.slimscroll.min.js"></script>
    <script src="../js/svs.framework.js"></script>
    <script src="../js/wp.js"></script>
    <script src="../js/user.api.js"></script>
</head>

<body>
    <script type="text/javascript">    
    function getUserDetail(){
    	Workport.UserAPI.getUserDetail(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	});
    }
    function getUserBasic(){
    	Workport.UserAPI.getUserBasic(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	});
    }
    function getUserVisit(){
    	Workport.UserAPI.getVisitUser(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{userId:'CA160590'});
    }
    function updateUser(){
    	Workport.UserAPI.updateUserDetail(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{nickName:'',about:'',status:'',tags:''});
    }
    function updateUserImage(){
    	Workport.UserAPI.updateUserImage(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{imageBase64:"QEBA"});
    }
    function getAccessUser(){
    	Workport.UserAPI.getAccessUser(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	});
    }
    function followUser(){
    	Workport.UserAPI.followUser(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{userId:'CA160590',action:'Follow'});
    }
    function getNetworkUser(){
    	Workport.UserAPI.getAccessUser(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	});
    }
    function login(){
    	Workport.UserAPI.login(function(data){    		
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{userId:'CA160590',password:'P@c!f!c'});
    }
    function clearLog(){
    	$('#result').get(0).innerText = "";
    	console.log(Math.uuid());
    	console.log(Math.uuid());
    }
    </script>
    
</body>
	<input type = "button" onclick = "clearLog()" value="Clear"></br>
	<input type = "button" onclick = "getUserDetail()" value="Detail">
	<input type = "button" onclick = "getUserBasic()" value="Basic">
	<input type = "button" onclick = "getUserVisit()" value="Visit">
	<input type = "button" onclick = "updateUser()" value="Update">
	<input type = "button" onclick = "updateUserImage()" value="Image">
	<input type = "button" onclick = "getAccessUser()" value="Access">
	<input type = "button" onclick = "followUser()" value="Follow">
	<input type = "button" onclick = "getNetworkUser()" value="Network">
	<input type = "button" onclick = "getUserDetail()" value="Auth">
	</br>
	
	<div id="result" style="margin: 0px;"></div>
	
</html>